home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / programs / internet / tcp / server / port-lpr.lha / README < prev    next >
Encoding:
Text File  |  1991-03-22  |  3.8 KB  |  81 lines

  1. This is something I threw together to allow various non-BSD systems
  2. to print over the network to print queues on BSD-style systems
  3. (like SunOS and Ultrix and...).  Basically, it's a standalone clone
  4. of the BSD "lpr" command -- like BSD lpr but it doesn't need a print
  5. spooler on the local machine.
  6.  
  7. You do have to have a BSD-style TCP implementation on your machine
  8. (with socket(), bind() and that sort of stuff), and you have to have
  9. access to an lpd server somewhere on the network.
  10.  
  11. It's written in ANSI-ish C, because I find that it's a lot easier to
  12. get the bugs out of my programs when I use function prototypes.  I
  13. considered fixing this to work with Classic C, but I'm too busy working
  14. on my thesis right now, and several people have asked for this.  If
  15. you have GNU cc or some other ANSI C compiler, it should just compile
  16. and run for you.  If you don't have an ANSI C compiler, but you do
  17. understand a little bit of C, you probably won't have too much trouble
  18. getting it running.  Otherwise, perhaps some kind soul will take the
  19. time to make the required changes and send out patches.
  20.  
  21. At one time or another, I have tested this on SCO ODT 1.0, SunOS 4.1,
  22. Ultrix 3.x, 4.3 BSD, and on a Stardent Titan running some variant of
  23. SysV.  I think it should still work in all of these environments.  I
  24. always used Sun machines as printer servers, but I would expect this
  25. program to work with any server running 4.2BSD or 4.3BSD-derived code.
  26.  
  27. * Warranty:
  28.  
  29. There is NO WARRANTY for this software, not even for merchantability
  30. nor for fitness for any particular purpose.  Anyone who installs or uses
  31. this software, does so entirely at his or her own risk.  The author
  32. will not be responsible for any ill consequences of the installation
  33. or use of this software, no matter how terrible.
  34.  
  35. * Copyright, use and redistribution:
  36.  
  37. The source code for this program is Copyright 1990, 1991 by Keith Moore
  38.  
  39. Use of this program and distribution of the code in either source or
  40. compiled binary form are governed by the GNU General Public License, 
  41. Version 1.  See the file LICENSE for details.
  42.  
  43. * Installation:
  44.  
  45. "make install" should do the trick.  You may have to edit the Makefile
  46. to change the installation directory.  Install the man page by hand,
  47. if your system supports these.  The file "lpr.cat" is a preformatted
  48. man page, in case your system does not support nroff.  If your system
  49. has a man command, you may be able to copy the lpr.cat file into an
  50. appropriate directory with an appropriate name so that "man lpr" will
  51. work.
  52.  
  53. The program is installed set-uid to root, which is necessary so that lpr
  54. can bind to a privileged TCP port.  This should not present a security
  55. risk since the first thing that the program does is to create the socket
  56. and bind it to the privileged port, after which it immediately disables
  57. its privileges.  All file opens, reads, etc., are then done with the 
  58. invoking user's normal privileges.
  59.  
  60. lpr expects that the environment variable LPD_SERVER will be set to 
  61. the hostname of a machine which has a working BSD-style line printer
  62. daemon.  Your host must have permission to print on the server's
  63. print queues -- generally this is done by editing either /etc/hosts.lpd
  64. or /etc/hosts.equiv (preferably the former) on the server.
  65.  
  66. * Miscellaneous:
  67.  
  68. There are several stub routines in here to add support for running
  69. this program under VMS, or for using DECnet instead of TCP.  Don't
  70. worry about them unless you feel like adding the actual code to do
  71. this.  The use_dev_printer code was an early attempt at trying to use
  72. the named socket /dev/printer to spool files -- thus allowing lpr to
  73. work without being installed set-uid.  This did not work because of
  74. bugs in the BSD server code.
  75.  
  76. If you find bugs and can supply fixes, please let me know and I'll try
  77. and have the fixes incorporated into a future release.
  78.  
  79. Keith Moore
  80. moore@cs.utk.edu
  81.